updating oE get_key
Keyboard Related Routines
get_key
<built-in> function get_key()
returns the key that was pressed by the user, without waiting. Special codes are returned for the function keys, arrow keys, and so on.
Returns:
An integer, either -1 if no key waiting, or the code of the next key waiting in keyboard buffer.
Comments:
The operating system can hold a small number of key-hits in its keyboard buffer. get_key will return the next one from the buffer, or -1 if the buffer is empty.
Run the .../euphoria/demo/key.ex program to see what key code is generated for each key on your keyboard.
Example 1:
integer n = get_key() if n=-1 then puts(1, "No key waiting.\n") end if
See Also:
Not Categorized, Please Help
|